﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SmartSpace.WebForm.SystemModule
{
    public partial class SummaryView : AppView
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Core.ICoreService service = SmartSapce.ServiceLocation.ServiceLocator.Get<Core.ICoreService>();
                List<Core.Application> applications = service.GetApplications();
                this._ctlList.DataSource = applications;
                this._ctlList.DataBind();
            }
        }

        protected void _ctlBtnApplicationSummary_Click(object sender, EventArgs e)
        {
            LinkButton button = sender as LinkButton;
            this.SwitchSubView("application summary view", "subviews/ApplicationSummaryView.ascx", button.CommandArgument);
        }
    }
}